package cn.practice.articlepractice01.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

@Data
public class UserArticleDTO {

    @ApiModelProperty(value = "文章内容")
    @NotEmpty
    @Size(min = 10,max = 500,message = "文章内容长度在20到500之间")
    private String message;

    @ApiModelProperty(value = "文章标题")
    @NotEmpty
    @Size(min = 1,max = 20,message = "文章标题长度在1到20之间")
    private String title;
}
